package com.chx.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Author cp-月入过万
 * @Date 2025/5/29
 * 出库单
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class StockOutOrders implements Serializable {
    private static final long serialVersionUID = 1L;

    //出库单ID，自增，主键
    private Long orderId;

    //出库单编号，唯一
    private String orderNumber;

    //关联的订单类型，0：销售订单，1：采购订单，3：盘点单
    private Integer relatedOrderType;

    //相关订单ID，当related_order_type为0时，关联sale_orders表的order_id；为1时，可为空
    private Long relatedOrderId;

    //操作人员ID，外键，关联users表的user_id
    private Long userId;

    //出库日期
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime  orderDate;

    //仓库名称
    private String warehouse;

    //出库总金额
    private Double totalAmount;

    //出库单状态，0：待审核，1：已审核，2：已完成
    private Integer status;

    //备注
    private String remark;

    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    //更新时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
